
exports.up = function(knex) {
    return knex.schema.table('departments', function(table) {
        table.increments().primary();

        table.tinyint('deleted')
            .defaultTo(0)
            .notNull()
            .unsigned();

        table.string('name')
            .defaultTo('')
            .notNull()
            .comment('部门名称');

        table.timestamps();
    });
};

exports.down = function(knex) {
    return knex.schema.dropTableIfExists('departments');
};
